#ifndef MCELLIPSEPARAMETRICWINDOW_H
#define MCELLIPSEPARAMETRICWINDOW_H

#include <QWidget>
#include <MCCommand.h>
#include <MCEllipseVisual.h>

namespace Ui {
class MCEllipseParametricWindow;
}

class MCEllipseParametricWindow : public QWidget
{
    Q_OBJECT

public:
    explicit MCEllipseParametricWindow(MCCommand *command, MCEllipseVisual * ellipseVisual, QWidget *parent = nullptr);
    ~MCEllipseParametricWindow();

private slots:
    void on_x1_le_textChanged(const QString &arg1);

    void on_y1_le_textChanged(const QString &arg1);

    void on_radius_le_textChanged(const QString &arg1);

    void on_radiusy_le_textChanged(const QString &arg1);

    void on_apply_b_clicked();

    void on_terminate_b_clicked();

private:

    bool isTextValid(QString text);
    void updateValue();

private:
    Ui::MCEllipseParametricWindow *ui;

    MCEllipse2D _ellipse;
    MCEllipseVisual *_ellipseVisual;
    MCCommand *_currentCommand;
};

#endif // MCELLIPSEPARAMETRICWINDOW_H
